#ifndef __CRT_SERIAL_HPP__
#define __CRT_SERIAL_HPP__
#include <string>





class crtSerial
{
private:
    int fd;
    
public:
    crtSerial(const std::string& com, int baudrate=9600, int databits=8, int stopbits=1, int parity='n');
    ~crtSerial();
    void close();
    void write(char *str);
    void write(std::string str);
    std::string read(int count);
    std::string read_line();
    int in_waitting(int timeout=0);
    
};



#endif /*__CRT_SERIAL_HPP__*/